.text
.global _start

_start:
	ldr sp,=0x40000000 + 4096
	bl disable_watch_dog
	bl memsetup

	ldr r0,=0x30000000
	mov r1,#4096
	bl sdram_init

	bl led_init

	bl led2_on

	bl nand_init
	ldr r0,=0x30000000
	mov r1,#4096
	mov r2,#2048
	bl nand_read

	bl led4_on

	ldr sp,=0x34000000
	ldr lr,=halt_loop
	ldr pc,=main

halt_loop:
	b halt_loop
